// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

// 引入国际化组件
import VueI18n from 'vue-i18n';

Vue.use(VueI18n);

// 调用语言包
const i18n = new VueI18n({
  //默认语言包
  locale: 'cn',
  messages: {
    'cn': require('./lang/cn'),
    'en': require('./lang/en'),
  }
})

// 引入element ui 组件
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(ElementUI)

Vue.config.productionTip = false

require('!style-loader!css-loader!./assets/bootstrap/css/bootstrap.css');
require('!style-loader!css-loader!./assets/bootstrap/css/style.css');
require('!style-loader!css-loader!./assets/index.css');

/*引入axios*/
import Axios from 'axios'

Vue.prototype.axios = Axios;

// 每一次请求是否携带cookie 才能保存session的id 要是获取session的id就要打开行代码
Axios.defaults.withCredentials = true;

import QS from 'qs'

Vue.prototype.qs = QS;

import HeyUI from 'heyui';

Vue.use(HeyUI);


new Vue({
  el: '#app',
  router,
  //装载语言包
  i18n,
  components: {App},
  template: '<App/>',
  render: h => h(App)
})
